#!/usr/bin/perl
use warnings;
use strict;
print("Please enter a DNA sequence : ");
my $DNA = <STDIN>;
chomp($DNA);
$DNA = uc($DNA);
my $regexp = "(ATG)(.*?)(TAG)"; 
if($DNA =~ /$regexp/){
print("The pattern was found!\n");
print($2);
}
else{
print("The pattern was not found.\n");
} 